function readDBPlugin()
{
}

readDBPlugin.prototype.getSets = function(successCallback, errorCallback) {
    if (typeof errorCallback != "function")  {
        console.log("readDBPlugin.getSets failure: errorCallback parameter must be a function");
        return
    }

    if (typeof successCallback != "function") {
        console.log("readDBPlugin.getSets failure: successCallback parameter must be a function");
        return
    }
    var week = localStorage.getItem('week_num');
    var day = localStorage.getItem('day_num');
    var type = localStorage.getItem('category_type');
    cordova.exec(
      successCallback, // called when signature capture is successful
      errorCallback, // called when signature capture encounters an error
      'ReadDB', // Tell cordova that we want to run "PushNotificationPlugin"
      'getSets', // Tell the plugin the action we want to perform
      [ week , day , type ]
    ); // List of arguments to the plugin
};

readDBPlugin.install = function()
{
    if(!window.plugins)
    {
        window.plugins = {};
    }

    window.plugins.readDBPlugin = new readDBPlugin();
    return window.plugins.readDBPlugin;
};


cordova.addConstructor(readDBPlugin.install);